<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户列表</title>
    <style>
        table {
            border-collapse: collapse;
            width: 100%;
        }

        th, td {
            padding: 8px;
            text-align: left;
            border-bottom: 1px solid #ddd;
        }

        th {
            background-color: #f2f2f2;
        }
    </style>
</head>
<body>
<h2>用户列表</h2>

<table>
    <thead>
    <tr>
        <th>ID</th>
        <th>用户名</th>
        <th>昵称</th>
        <th>邮箱</th>
    </tr>
    </thead>
    <tbody>
    <!-- 使用 Thymeleaf 动态渲染数据 -->
    <tr th:each="user : ${users}">
        <td th:text="${user.id}">ID</td>
        <td th:text="${user.username}">用户名</td>
        <td th:text="${user.nickname}">昵称</td>
        <td th:text="${user.email}">邮箱</td>
    </tr>
    </tbody>
</table>

<br/>
<a href="/index.html">返回首页</a>
</body>
</html>